package com.hrp.hrpdao;

import com.hrp.domain.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by Administrator on 2018/8/5 0005.
 */
@Mapper
public interface RoleDao {

    @Select("select a.id,a.name,a.tybz from HRP_Role a inner join HRP_User_Role b on a.id= b.roleId where userId=#{userId}")
    List<Role> findRoleListByUserId(@Param("userId")Integer userId);

    @Select("select * from HRP_Role")
    List<Role> getAllRoles();


}
